import request from '@/utils/request'

// 查询出库单列表
export function listExWarehouse(query) {
  return request({
    url: '/wms/exWarehouse/list',
    method: 'get',
    params: query
  })
}

// 初始化
export function initBean() {
    return request({
        url: '/wms/exWarehouse/initBean',
        method: 'post'
    })
}

export function addTransferStaging(data) {
    return request({
        url: '/wms/exWarehouse/addStaging',
        method: 'post',
        data:data
    })
}

// 查询出库单详细
export function getExWarehouse(id) {
  return request({
    url: '/wms/exWarehouse/' + id,
    method: 'get'
  })
}

// 新增出库单
export function addExWarehouse(data) {
  return request({
    url: '/wms/exWarehouse',
    method: 'post',
    data: data
  })
}

// 修改出库单
export function updateExWarehouse(data) {
  return request({
    url: '/wms/exWarehouse',
    method: 'put',
    data: data
  })
}

// 删除出库单
export function delExWarehouse(id) {
  return request({
    url: '/wms/exWarehouse/' + id,
    method: 'delete'
  })
}

// 归还出库单
export function returnExWarehouse(id) {
  return request({
    url: '/wms/exWarehouse/returnExWarehouse/' + id,
    method: 'get'
  })
}
